<template>
  <div class="aside-menu">
    <div class="logo">
      <span v-if="$store.state.menuCollapse">V</span>
      <span v-else>SODA-CRM</span>
    </div>
    <el-menu
    background-color="#394a55"
    text-color="#fff"
    active-text-color="#ffd04b"
    :router="true"
    :unique-opened="true"
    :default-active="$route.path"
    :collapse-transition="false"
    :collapse="$store.state.menuCollapse">
      <el-menu-item index="/">
        <i class="el-icon-s-home"></i>
        <span slot="title">首页</span>
      </el-menu-item>
      <el-submenu index="2">
        <template slot="title">
          <i class="el-icon-s-custom"></i>
          <span>客户管理</span>
        </template>
        <el-menu-item index="/customers">
          <i class="el-icon-user-solid"></i>
          客户列表
        </el-menu-item>
        <el-menu-item index="/areas">
          <i class="el-icon-location-outline"></i>
          地区列表
        </el-menu-item>
      </el-submenu>
      <el-submenu index="3">
        <template slot="title">
          <i class="el-icon-s-tools"></i>
          <span>系统管理</span>
        </template>
        <el-menu-item index="/users">
          <i class="el-icon-user"></i>
          用户列表
        </el-menu-item>
        <el-menu-item index="/roles">
          <i class="el-icon-s-open"></i>
          角色列表
        </el-menu-item>
        <el-menu-item index="/menus">
          <i class="el-icon-menu"></i>
          菜单列表
        </el-menu-item>
      </el-submenu>
    </el-menu>
  </div>
</template>

<script>
export default {}
</script>

<style scoped>
.el-menu {
  border-right: 1px solid #394a55;
  height: 100%;
}
.logo {
  background-color: #409eff;
  height: 60px;
  line-height: 60px;
  text-align: center;
  font-size: 30px;
  color: #ffffff;
}
</style>
